package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Emp;
import com.itheima.pojo.EmpQueryParam;
import org.apache.ibatis.annotations.*;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

@Mapper
public interface EmpMapper extends BaseMapper<Emp> {
    //    @Select("select count(*) from emp e left join dept d on e.dept_id =d.id  ")
//    public Long count();
//    @Select("select e.*,d.name from emp e left join dept d on e.dept_id = d.id limit #{startPage},#{pageSize}")
//    public List<Emp> findPage(@Param("startPage") Integer startPage,@Param("pageSize") Integer pageSize );
    //
//    List<Emp> list(EmpQueryParam empQueryParam);
//
//    @Options(useGeneratedKeys = true ,keyProperty="id" )
//    @Insert("insert into emp( username, name, gender, phone, job, salary, image, entry_date, dept_id, create_time, update_time) " +
//            "values (#{username},#{name},#{gender},#{phone},#{job},#{salary},#{image},#{entryDate},#{deptId},#{createTime},#{updateTime})")
//    public void savelist(Emp emp);
//
//    void deleteById(@Param("ids") List<Integer> ids);
//    @Select("select * from  emp where id = #{id}")
//    Emp getById(Integer id);

//    void updateById(Emp emp);
@MapKey("jobName")
    List<Map<String, Object>> countEmpJobData();
@MapKey("name")
    List<Map> getgender();

//    @Select("select * from emp")
//    List<Emp> findAll();
}